package com.jinmdz.fmis.dao.model.area;

import com.jinmdz.fmis.dao.base.BaseItem;

/**
 * 行政区划
 *
 * @author LiCongLu
 * @date 2020-01-17 13:13
 */
public class SystemAreaItem extends BaseItem implements Comparable<SystemAreaItem> {
    /**
     * 父行政区划主键
     */
    private Integer parentId;

    /**
     * 父行政区划编码
     */
    private String parentCode;

    /**
     * 行政区划编码
     */
    private String areaCode;

    /**
     * 行政区划名称
     */
    private String areaName;

    /**
     * 行政区划名称拼音缩写
     */
    private String areaNameAbbr;

    /**
     * 禁用状态
     */
    private Integer disableState;

    /**
     * 是否省市区县
     */
    private Integer asProvinceCityCounty;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 备注
     */
    private String remark;

    public Integer getParentId() {
        return parentId;
    }

    public SystemAreaItem setParentId(Integer parentId) {
        this.parentId = parentId;
        return this;
    }

    public String getParentCode() {
        return parentCode;
    }

    public SystemAreaItem setParentCode(String parentCode) {
        this.parentCode = parentCode;
        return this;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public SystemAreaItem setAreaCode(String areaCode) {
        this.areaCode = areaCode;
        return this;
    }

    public String getAreaName() {
        return areaName;
    }

    public SystemAreaItem setAreaName(String areaName) {
        this.areaName = areaName;
        return this;
    }

    public String getAreaNameAbbr() {
        return areaNameAbbr;
    }

    public SystemAreaItem setAreaNameAbbr(String areaNameAbbr) {
        this.areaNameAbbr = areaNameAbbr;
        return this;
    }

    public Integer getDisableState() {
        return disableState;
    }

    public SystemAreaItem setDisableState(Integer disableState) {
        this.disableState = disableState;
        return this;
    }

    public Integer getAsProvinceCityCounty() {
        return asProvinceCityCounty;
    }

    public SystemAreaItem setAsProvinceCityCounty(Integer asProvinceCityCounty) {
        this.asProvinceCityCounty = asProvinceCityCounty;
        return this;
    }

    public Integer getSort() {
        return sort;
    }

    public SystemAreaItem setSort(Integer sort) {
        this.sort = sort;
        return this;
    }

    public String getRemark() {
        return remark;
    }

    public SystemAreaItem setRemark(String remark) {
        this.remark = remark;
        return this;
    }

    @Override
    public int compareTo(SystemAreaItem o) {
        if (o == null || o.sort == null) {
            return 1;
        }

        if (this.sort == null) {
            return -1;
        }

        if (this.sort.intValue() == o.sort.intValue()) {
            return 0;
        }
        return this.sort.intValue() > o.sort.intValue() ? 1 : -1;
    }
}
